package org.demo.warehouse.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.demo.warehouse.common.pojo.Warehouse;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.demo.warehouse.common.pojo.WarehouseVo;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zgc
 * @since 2021-12-16
 */
public interface WarehouseMapper extends BaseMapper<Warehouse> {

    @Select("select warehouse.*,user.name as user_name from warehouse left join user on warehouse.user_id=user.id ${ew.customSqlSegment}")
    <E extends IPage<WarehouseVo>> E selectPageVo(E page, @Param(Constants.WRAPPER)Wrapper<Warehouse> queryWrapper);
}
